package com.Common;
/**
 * @description:业务码和业务消息
 * @author: hkw14
 * @time: 2021/4/28 15:10
 */
public enum CodeMsg {
    USER_ACCOUNT_PASSWORD_ERROR(4001002,"账号密码不正确"),
    USER_ADD_ERROR(4001006,"用户添加失败"),
    USER_USERID_ERROR(4001007,"用户ID信息有误"),
    USER_ACCOUNT_EXISTS_ERROR(4001004,"用户账号已经被占用"),
    USER_ACCOUNT_INVALID_ERROR(4001003,"用户账号已失效"),
    USER_PASSWORD_RESET_ERROR(4001008,"用户密码重置失败"),
    USER_ROLE_ERROR(4001005,"用户角色不正确"),
    USER_DELETE_ERROR(4001009,"用户删除失败"),
    USER_SESSION_INVALI_ERROR(4001010,"用户登录失效"),
    USER_IMG_UPDATE_ERROR(4001011,"用户头像修改失败"),
    USER_PASSWORD_ERROR(4001012,"用户当前密码错误"),
    USER_PASSWORD_NOT_SAME_ERROR(4001013,"用户新密码不一致"),
    USER_PASSWORD_UPDATE_ERROR(4001014,"用户密码修改失败"),
    USER_RIGHTS_ERROR(4001015,"用户没有权限"),

    //商品模块
    GOOD_DELETE_ERROR(1001001,"商品删除失败"),
    GOOD_ADD_ERROR(1001002,"商品添加失败"),
    //订单模块
    ORDER_ADD_ERROR(5001001,"订单添加失败"),
    //成功
    SUCCESS(200,"操作成功");
    /**
     * 业务码和业务信息
     */
    int code;
    String msg;

    CodeMsg(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
